import React from 'react';
import css from './index.less';
import PropTypes from 'prop-types';
import classnames from 'classnames';

class Redirect extends React.Component {

  static propTypes = {
    label: PropTypes.string,
    max: PropTypes.number,
    min: PropTypes.number,
    step: PropTypes.number,
    value: PropTypes.any,
    marks: PropTypes.object,
    onChange: PropTypes.func,
  };

  static defaultProps = {
    label: '二级标题',
    max: 100,
    min: 0,
    step: 1,
    value: 0,
    marks: {},
    onChange: () => {},
  };

  onChange = (e) => {
    this.props.onChange(e.target.value);
  };

  render() {
    return (
      <div className={css.inputUrl}>
        <label>URL</label>
        <input onChange={this.onChange} value={this.props.link}/>
      </div>
    );
  }
}

export default Redirect;


